/**
 * @properties={typeid:35,uuid:"DCB4CF9F-3208-4716-8C71-5DDFE75F978B"}
 */
var fConcepto = null;

/**
 * @properties={typeid:35,uuid:"EC9538CC-3535-41A7-8698-422A5B70E506",variableType:4}
 */
var fEstado = null;

/**
 * @properties={typeid:35,uuid:"7A51E0CC-FF94-4E9B-B106-AE177DA2B90A",variableType:93}
 */
var fFechaDesde = null;

/**
 * @properties={typeid:35,uuid:"06855436-CCBC-4C58-9376-778A548F80ED",variableType:93}
 */
var fFechaHasta = null;

/**
 * @properties={typeid:35,uuid:"201C03AF-4B70-463A-9EA0-CAD1D53C0F3A",variableType:4}
 */
var fSubdiarioId = null;

/**
 * @properties={typeid:35,uuid:"579CF13E-5B1D-4E38-B0E7-BAF8D72358A3",variableType:4}
 */
var fTipoId = null;

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"C6CDD8F9-057E-44B4-BA62-147A4AD8E8E4"}
 */
function ira_asiento_cab(event) {
	//forms.asientos_cab.controller.show()
	globals.mostrarForm('asientos_cons_cab')
}

/**
 * Perform the element default action.
 *
 * @param {JSEvent} event the event that triggered the action
 *
 * @properties={typeid:24,uuid:"4E78EA20-7B48-492D-9347-5A03397F13B5"}
 */
function buscar(event) {
	
	if (elements.concepto1.readOnly = 0)
	{
		controller.find()
		
		var d1 = fFechaDesde
		var d2 = fFechaHasta
		if ((fFechaDesde != null) && (fFechaHasta != null))
		{
			d1.setHours(00);
			d1.setMinutes(00);
			d1.setSeconds(00);
			var df1 = utils.dateFormat(d1, 'dd-MM-yyyy hh:mm:ss')
		
			d2.setHours(23);
			d2.setMinutes(59);
			d2.setSeconds(59);
			var df2 = utils.dateFormat(d2, 'dd-MM-yyyy hh:mm:ss')
		}
		
		fecha 				= d1 + '...' + d2
		concepto 			= fConcepto
		subdiario_id 		= fSubdiarioId
		tipo_id 			= fTipoId 
		marca_consolidado 	= fEstado
		
		controller.search()
	}
	else
	{
		elements.concepto1.readOnly 		 = 0 
		elements.fFechaDesde.readOnly 		 = 0 
		elements.fFechaHasta.readOnly 		 = 0 
		elements.marca_consolidado1.readOnly = 0 
		elements.tipo_id1.readOnly 			 = 0 
		elements.subdiario_id.readOnly 		 = 0 
	}
}
